﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;

using WCFThree.Entity;
namespace WCFThree.Factory
{
    /// <summary>
    /// 数据操作基类
    /// </summary>
    public class BaseOperate
    {
        // public BaseContext Context = new BaseContext();\

        private static string CallContextKey = "Stu_Context";
        public static BaseContext Context
        {
            get
            {
                if (CallContext.GetData(CallContextKey) == null)
                {
                    CallContext.SetData(CallContextKey, new BaseContext());
                }

                return CallContext.GetData(CallContextKey) as BaseContext;
            }
            set
            {
                CallContext.SetData(CallContextKey, value);
            }
        }
    }
}
